Creates an empty temporary file and returns the full path. The file is stored in the temp folder on the test computer hard drive and is not automatically deleted.
Syntax
CreateTempFile()
Return value
| Value | Description |
|---|---|
| Value | Full path to the empty temporary file. |
Example
tempFile = CreateTempFile()
Try
' Update the session ID before posting the file contents
contents = ReadTextFile("LoginTest_1.postdata", EncodingAutoDetect)
jsonObject = JSONParse(contents)
jsonObject = JSONObjectSetValue(jsonObject, "sessionID", sessionID)
AppendToFile(tempFile, jsonObject, EncodingAutoDetect)
WebPostFromFile("http://www.wysicorp.com/login.php", "application/json", tempFile)
Finally
DeleteFile(tempFile)
End Try